package com.kd.juhaowan.ui.holder;

import android.annotation.SuppressLint;
import android.view.View;
import android.widget.TextView;

import androidx.annotation.NonNull;

import com.bumptech.glide.Glide;
import com.flyjingfish.shapeimageviewlib.ShapeImageView;
import com.kd.juhaowan.R;
import com.kd.juhaowan.http.model.ShequModel;
import com.kd.juhaowan.ui.adapter.BaseViewHolder;
import com.kd.juhaowan.utils.GlideHelper;


import butterknife.BindView;

public class FuliShequViewHolder extends BaseViewHolder {



    @BindView(R.id.item_image)
    ShapeImageView imageView;

    @BindView(R.id.item_status)
    TextView statusView;
    @BindView(R.id.item_game_sheyu)
    TextView titleView;





    public FuliShequViewHolder(@NonNull View itemView) {
        super(itemView);
    }



    @SuppressLint("ResourceType")
    public void setDate(ShequModel model){
        GlideHelper.loadGoodsCover(Glide.with(getItemView()),imageView,model.getImage());
        titleView.setText(model.getName());
        if(model.getStatus()==0){
            statusView.setText("进行中");
            statusView.setTextColor(getContext().getColor(R.color.c60));
            statusView.setBackgroundResource(R.drawable.status_0);
        }else{
            statusView.setText("已结束");
            statusView.setTextColor(getContext().getColor(R.color.login_edit_hint));
            statusView.setBackgroundResource(R.drawable.status_1);
        }

    }


}
